<template>
  <div class="auth-wrapper">
    <div class="auth">
      <div class="auth-info">
        <div class="auth-img">
          <img src="http://img5.imgtn.bdimg.com/it/u=4010493640,572260361&fm=26&gp=0.jpg" style="width: 100%; height: 100%;" alt="">
        </div>
        <div class="sub-title">这里木兰君</div>
        <div class="title">为你解决挑礼物的烦恼</div>
      </div>
      <button
        class="auth-button"
        open-type="getUserInfo"
        @getUserInfo="getUserInfo"
      >授权登录</button>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    getUserInfo () {
      this.$emit('getUserInfo')
    }
  }
}
</script>

<style lang="scss" scoped>
.auth-wrapper {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  .auth {
    width: 270px;
    height: 240px;
    border-radius: 16px;
    position: relative;
    background-color: #fff;
    .auth-info {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      margin-top: 10px;
      .auth-img {
        width: 100px;
        height: 100px;
        background-color: #ccc;
        border-radius: 50%;
        overflow: hidden;
      }
      .sub-title {
        font-weight: 700;
      }
      .title {
        font-weight: 700;
      }
    }
    .auth-button {
      position: absolute;
      bottom: 0px;
      width: 100%;
      color: #fff;
      background-color: #ffd500;
    }
  }
}
</style>
